import "./assets/main.css";
import "@/assets/fonts/iconfont.css";

import { createApp } from "vue";
import { createPinia } from "pinia";

import App from "./App.vue";
import router from "./router/index.js";

// 引入element-plus css样式库
import "element-plus/dist/index.css";
// 引入element-plus组件库
import ElementPlus from "element-plus";
// 让element-plus支持中文
import zhCn from "element-plus/dist/locale/zh-cn.mjs";

import * as ElementPlusIconsVue from "@element-plus/icons-vue";

const app = createApp(App);

app.use(ElementPlus, {
    locale: zhCn,
    size: "default",
    zIndex: 3000,
});

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}

app.use(createPinia());
// 将路由挂载到全局的app上
app.use(router);

app.mount("#app");
